<template>
	<div class="app">
		<h1 @click="test">我是App组件</h1>
		<Child @click.native="test"/>
	</div>
</template>

<script>
	import Child from './components/Child.vue'
	export default {
		name:'App',
		components:{Child},
		methods: {
			test(){
				alert('test')
			}
		},
	}
</script>

<style>
	.app{
		background-color: gray;
		padding: 20px;
	}
</style>